package cn.com.dhcc.ddi.task.service.extract.impl;

import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.pub.core.consts.AppIocBean;
import cn.com.dhcc.ddi.task.service.DataSet;
import cn.com.dhcc.ddi.task.service.Result;
import cn.com.dhcc.ddi.task.service.extract.EDataSourceDBAbstract;
import cn.com.dhcc.ddi.task.service.transform.MapOrder;
import cn.com.dhcc.ddi.task.vo.Task;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import java.util.Set;
/**
 * 数据抽取的SqlServer实现
 * @Date：2016/11/17 11:52
 * @author：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
@Service(AppIocBean.E_DATASOURCE_SQLSERVER_IMPL)
public class EDataSourceSqlServerImpl extends EDataSourceDBAbstract {
	private static Logger logger = Log.getLogger(Log.LOGTYPE.DDI);
	@Override
	public Result extractData(Task task , String taskLogId) throws ServiceException {
			String sql = "select convert(varchar, getdate(), 120)";
			return super.extract(task,taskLogId,sql);
	}

	@Override
	public DataSet extractData(String dataSourceMeteData,
			Set<MapOrder> mapOrders) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Result loadData(String dataSourceMeteData, DataSet dataSets) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void reciveNotify(String taskLogId,String status,String msg) {
		super.reciveNotify(taskLogId,status,msg);
	}
}
